//代理的内部实现对外部代码是不可见的，因此要隐藏目标对象上的属性也轻而易举。比如：
const hiddenPropertyName = ['foo','bar'];
const target = {
  foo: '1',
  bar: '2',
  age: '15'
}
const handler = {
  get(target,property,receiver){
    if(hiddenPropertyName.includes(property)){
      return undefined
    } else {
      return Reflect.get(...arguments)
    }
  },
  has(target,property){
    if(hiddenPropertyName.includes(property)){
      return false
    } else {
      return Reflect.has(...arguments)
    }
  }
}
const proxy = new Proxy(target,handler);
//get()
console.log(proxy.foo);//undefined
console.log(proxy.bar);//undefined
console.log(proxy.age);//15
//has()
console.log( 'foo' in proxy);//false
console.log( 'bar' in proxy);//false
console.log( 'age' in proxy);//true